import java.util.Scanner;

public class AA {
    public static void main(String[] args) {
        Scanner A = new Scanner(System.in);
        int x;
        System.out.println("请输入网购金额");
        x = A.nextInt();
        int n;
        System.out.println("请输入距离（km）");
        n = A.nextInt();
        if(0<n&&n<10){
            x+=10;
        }
        if (n<=50){
            x+=50;
        }
        if (n<=100){
            x+=100;
        }
        if (n>100){
            x+=200;
        }
        System.out.println(x);

    }
}

